﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TopMenu.ascx.cs" Inherits="NguyenHoa.Web.Controls.TopMenu" %>
<div id="menu">
  <asp:Repeater runat="server" ID="rptMenu" OnItemDataBound="rptMenu_ItemDataBound">
    <ItemTemplate>
      <div id="divMenuItem" runat="server" class="menuItem">
        <div>
          <a runat="server" id="lnkMenuItem" title='<%# Eval("Title") %>'>
            <%# Eval("Title") %>
          </a>
        </div>
      </div>
    </ItemTemplate>
  </asp:Repeater>
</div>

<script type="text/javascript">
  function getRootUrl() {
    var href = window.location.href.toLowerCase();
    var ind = href.indexOf("/pages");
    href = href.substring(0, ind + 6);
    return href;
  }

  function enterKeyword(e) {
    var keynum;
    if (window.event)  // IE
    {
      keynum = e.keyCode;
    }
    else if (e.which)  // Firefox/Opera/ 
    {
      keynum = e.which;
    }
    if (keynum == 13) {
      checkKeyword();
      return false;
    }
  }


</script>

